<script setup>
import Navigation from '@/components/Navigation.vue';
</script>

<template>
  <div>
    <div class="navigation">
      <Navigation />
    </div>
    <keep-alive :include="['home','editor']">
      <router-view />
    </keep-alive>
  </div>
</template>

<script>
import { mapMutations, mapState } from 'vuex';
export default {
  name: 'App',
  computed:{...mapState('Setting',['routerName'])},
  methods:{...mapMutations('Setting',['setRouterName'])},
  watch: {
    '$route': {
      handler(newVal, oldVal) {
        this.setRouterName(newVal.name);
      },
      immediate: true
    }
  }
}
</script>

<style scoped>

</style>